home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / PolyEd / Doc / ARexx.doc next >
Text File  |  1996-09-26  |  17KB  |  564 lines

  1.  
  2.                        PolyEd's ARexx commands
  3.  
  4.                    Copyright © 1994,95 Avalon UnLtd.
  5.                       Written by Robert Brandner
  6.                          All Rights Reserved
  7.  
  8.  
  9. Like every good program, PolyEd provides an ARexx Port. This document
  10. describes all ARexx commands, PolyEd supports. For details about
  11. results, naming of ports etc. see the main guide (it's name depends
  12. on your preferred language).
  13.  
  14. Sorry, this document is - at the moment - only available in english.
  15.  
  16.  
  17. --------------------------------------------------------------------------
  18.  
  19. ACTIVATEWINDOW
  20.    ,
  21.  
  22. ACTIVATEWINDOW activates the first window of the project.
  23.  
  24. --------------------------------------------------------------------------
  25.  
  26. BACKSPACE
  27.    SOW/S,SOL/S
  28.  
  29. BACKSPACE deletes the character left to the cursor. At the beginning
  30. of a line, the EOL character of the previous line is deleted, and so
  31. the previous and the current line are joined.
  32.  
  33.  · SOW deletes to the start of the current word.
  34.  · SOL deletes to the start of the current line.
  35.  
  36. --------------------------------------------------------------------------
  37.  
  38. BLOCK
  39.    START/S,FORGET/S
  40.  
  41. BLOCK starts or forgets block selection.
  42.  
  43.  · START starts block selection. Following cursor movements will
  44.    select the block. Then you may CUT, COPY or ERASE the block.
  45.  · FORGET forgets selection.
  46.  
  47. Inserting or deleting text, or any mouse actions by the user,
  48. have the same effect as BLOCK FORGET, So you should "LOCKGUI", to
  49. avoid unwanted actions by the user.
  50.  
  51. --------------------------------------------------------------------------
  52.  
  53. CHANGEWINDOW
  54.    LEFTEDGE/N,TOPEDGE/N,WIDTH/N,HEIGHT/N
  55.  
  56. CHANGEWINDOW changes the position and size of the first window of
  57. the project.
  58.  
  59. --------------------------------------------------------------------------
  60.  
  61. CLOSE
  62.    FORCE/S
  63.  
  64. CLOSE closes the project and its window(s). If the project has been
  65. modified, the modified project requester comes up, asking the user if
  66. he wants to save the project first.
  67.  
  68.  · FORCE suppresses the modified project requester.
  69.  
  70. --------------------------------------------------------------------------
  71.  
  72. COLUMN
  73.    DELTA/N/A
  74.  
  75. COLUMN accepts positive and negative values, to move the cursor left or
  76. right relative to its current position.
  77.  
  78. --------------------------------------------------------------------------
  79.  
  80. COPY
  81.    ,
  82.  
  83. COPY places a duplicate of the currently selected block into the
  84. clipboard.
  85.  
  86. --------------------------------------------------------------------------
  87.  
  88. CURSOR
  89.    UP/S,DOWN/S,LEFT/S,RIGHT/S
  90.  
  91. CURSOR moves the cursor up, down, left or right a single line or
  92. column position.
  93.  
  94. --------------------------------------------------------------------------
  95.  
  96. CUT
  97.    LINE/S,EOL/S
  98.  
  99. CUT removes the currently selected block from the project, and places
  100. it in the clipboard.
  101.  
  102.  · LINE cuts the current line (incl. EOL)
  103.  · EOL cuts from current cursor position to end of line (excl. EOL)
  104.  
  105. --------------------------------------------------------------------------
  106.  
  107. DELETE
  108.    EOW/S,EOL/S
  109.  
  110. DELETE removes the character right to the cursor.
  111.  
  112.  · EOW deletes to the end of the current word.
  113.  · EOL deletes to the end of line. In contrary to CUT EOL, DELETE EOL
  114.    does not copy the deleted text to the clipboard.
  115.  
  116. --------------------------------------------------------------------------
  117.  
  118. ERASE
  119.    ,
  120.  
  121. ERASE removes the selected block from the project.
  122.  
  123. --------------------------------------------------------------------------
  124.  
  125. FIND
  126.    PROMPT/S,NEXT/S,PREVIOUS/S,TEXT/F
  127.  
  128. FIND searches for text that matches the specified text.
  129.  
  130.  · PROMPT opens the Find requester, but does not search.
  131.  · NEXT searches for the next occurence of findstring.
  132.  · PREVIOUS searches for the previous occurence of findstring.
  133.  · TEXT sets findstring to specified text.
  134.  
  135. 'FIND NEXT' finds the next occurence of whatever findstring is.
  136. 'FIND foobar' sets findstring to 'foobar' but does not search.
  137. 'FIND NEXT foobar' sets findstring to 'foobar' and searches.
  138. 'FIND PROMPT' opens the Find requester.
  139.  
  140. --------------------------------------------------------------------------
  141.  
  142. FINDCHANGE
  143.    FINDCHANGE PROMPT/S,FIND/K,CHANGE/K,ALL/S
  144.  
  145. Searches for text and replaces it by another text. This is done  like 
  146. replace from the menu, i. e. if the selected block matches findstring 
  147. it is replaced by changestring, else nothing is done. Then the next 
  148. occurence of findstring is selected. 
  149.  
  150.  · PROMPT opens the Find & Change requester, but does not search.
  151.  · FIND sets findstring to specified text.
  152.  · CHANGE sets changestring to specified text.
  153.  · ALL searches and changes from current cursor position to end
  154.    of text.
  155.  
  156. 'FINDCHANGE FIND foobar CHANGE hello' sets findstring to 'foobar',
  157. changestring to 'hello' and does a find & replace.
  158. 'FINDCHANGE' does a find & replace with current findstring
  159. and changestring.
  160.  
  161. --------------------------------------------------------------------------
  162.  
  163. FINDNEXT
  164.    ,
  165.  
  166. FINDNEXT finds the next occurence of findstring.
  167.  
  168. --------------------------------------------------------------------------
  169.  
  170. FINDPREVIOUS
  171.    ,
  172.  
  173. FINDPREVIOUS finds the previous occurence of findstring.    
  174.  
  175. --------------------------------------------------------------------------
  176.  
  177. GETATTR
  178.    OBJECT/A,NAME/N,FIELD
  179.  
  180. GETATTR obtains information about the attributes of an object.
  181.  
  182.  · OBJECT specifies the object type to obtain information on.
  183.  · NAME specifies the handle of the object.
  184.    Use only values obtained by previous calls to GETATTR.
  185.  · FIELD specifies which field should be checked for information.
  186.  
  187. In the above OBJECT you may seek information an the attributes of
  188. any of the following items:
  189.  
  190.  · APPLICATION
  191.  · PROJECTS
  192.  · PROJECT <name>
  193.  · MACROS
  194.  · MACRO <name>
  195.  · WINDOWS
  196.  · WINDOW <name>
  197.  
  198. If the destination variable is a stem variable, the following fields
  199. are available:
  200.  
  201. APPLICATION consists of the following nodes (an aspect of APPLICATION
  202. you can seek sub-information about):
  203.  
  204.  · VERSION         version and Copyright information
  205.  · SCREEN        name of the public screen, PolyEd resides in
  206.  · CURRENTWINDOW    title of currently active text window
  207.  · CURRENTPROJECT    name of the current project
  208.  · AREXX        name of PolyEd's ARexx port
  209.  · VAR_BLOCKSTARTLINE      these four nodes ...
  210.  · VAR_BLOCKSTARTCOL    ... contain the beginning ...
  211.  · VAR_BLOCKENDLINE    ... and end of ...
  212.  · VAR_BLOCKENDCOL    ... the selected block.
  213.  · VAR_FINDSTRING    findstring FIND, FINDCHANGE, FINDNEXT and FINDPREVIOUS look for
  214.  · VAR_CHANGESTRING    changestring, FINDCHANGE uses
  215.  · FLAG_IGNORECASE    status of 'Ignore Case?'
  216.  · FLAG_WHOLEWORDS    status of 'Whole Words?'
  217.  · VAR_ARRANGEMODE    current window arrange style
  218.             ( 0=stacked, 1=vertical, 2=horizontal, 3=full size )
  219.  · FLAG_LEARNING    status of 'Learn macro'
  220.  · VAR_RIGHTBORDER    'Right Border' value (from settings)
  221.  · VAR_TABWIDTH        'Tab Width' value (from settings)
  222.  · FLAG_OVERWRITE    status of 'Overwrite?'
  223.  · FLAG_AUTOINDENT    status of 'Auto indent?'
  224.  · FLAG_TABISSPACES    status of 'TAB is spaces?'
  225.  · FLAG_WORDWRAP    status of 'Word Wrap?'
  226.  · FLAG_CREATEICONS    status of 'Create icons?'
  227.  · VAR_AUTOSAVE      value of 'Auto Save' (from settings)
  228.  · VAR_BACKUPS        value of 'Backups' (from settings)
  229.  
  230. PROJECTS.COUNT contains the number of projects; PROJECTS.0 through
  231. PROJECTS.<PROJECTS.COUNT-1> contain the name of the project.
  232.  
  233. PROJECT consists of the following nodes:
  234.  
  235.  · FILENAME        the complete filename of the project
  236.  · PATH            the path portion of the filename
  237.  · FILE            the file portion of the filename
  238.  · LINES        the number of lines of the project
  239.  · CHANGES        the number of changes made to the
  240.             project (since last save).
  241.  · FLAG_HIDDEN        1=project is currently hidden, 0=project is visible
  242.  
  243. MACROS.COUNT contains the number of macros; MACROS.0 through
  244. MACROS.<MACROS.COUNT-1> contain the name of the macro.
  245.  
  246. MACRO consists of the following nodes:
  247.  
  248.  · FILENAME        the complete filename of the macro
  249.  · PATH            the path portion of the filename
  250.  · FILE            the file portion of the filename
  251.  · HOTKEY        the macros hotkey (as a string)
  252.  
  253. WINDOWS.COUNT contains the number of windows; WINDOWS.0 through
  254. WINDOWS.<WINDOWS.COUNT-1> contain the title of the window.
  255.  
  256. WINDOW consists of the following nodes:
  257.  
  258.  · PROJECT        name of the project, the window belongs to
  259.  · LEFT            left edge
  260.  · TOP            top edge
  261.  · WIDTH        width
  262.  · HEIGHT        height
  263.  · TITLE        title of the window
  264.  
  265. See the demo program 'getattr.ped' for how to use this complex command.
  266.  
  267. --------------------------------------------------------------------------
  268.  
  269. GETCHAR
  270.    ,
  271.  
  272. GETCHAR returns the character right to (or under) the cursor.
  273.  
  274. --------------------------------------------------------------------------
  275.  
  276. GETCURSORPOS
  277.    ,
  278.  
  279. GETCURSORPOS returns the position of the cursor. The following nodes
  280. are returned when using a stem variable:
  281.  
  282.  · LINE        Contains the line, the cursor is in.
  283.  · COLUMN    Contains the column the cursor is in.
  284.  
  285. --------------------------------------------------------------------------
  286.  
  287. GETLINE 
  288.    ,
  289.  
  290. GETLINE returns the contents of the line, under the cursor.
  291.  
  292. --------------------------------------------------------------------------
  293.  
  294. GETWORD 
  295.    ,
  296.  
  297. GETWORD returns the word under the cursor.
  298.  
  299. --------------------------------------------------------------------------
  300.  
  301. GOTOAUTOMARK 
  302.    ,
  303.  
  304. GOTOAUTOMARK moves to the cursor to the position where the last 
  305. change was made to the project.
  306.  
  307. --------------------------------------------------------------------------
  308.  
  309. GOTOCOLUMN
  310.    COLUMN/N/A
  311.  
  312. GOTOCOLUMN moves the cursor to the specified position.
  313.  
  314. --------------------------------------------------------------------------
  315.  
  316. GOTOLINE
  317.    LINE/N/A
  318.  
  319. GOTOLINE moves the cursor to the specified line.
  320.  
  321. --------------------------------------------------------------------------
  322.  
  323. LEARN
  324.    FILE/K,STOP/S
  325.  
  326. LEARN allows PolyEd to build an ARexx macro consisting of the 
  327. actions the user performs.
  328.  
  329.  · FILE specifies where the macro is to be saved.
  330.  · STOP tells PolyEd to stop learning.
  331.  
  332. --------------------------------------------------------------------------
  333.  
  334. LINE
  335.    DELTA/N/K
  336.  
  337. LINE accepts positive or negative arguemtns to move the cursor up or 
  338. down relative to its current position.
  339.  
  340. --------------------------------------------------------------------------
  341.  
  342. LOCKGUI
  343.    ,
  344.  
  345. LOCKGUI inhibits the graphical user interface of PolyEd.
  346.  
  347. --------------------------------------------------------------------------
  348.  
  349. MOVEWINDOW
  350.    LEFTEDGE/N,TOPEDGE/N
  351.  
  352. MOVEWINDOW is used to change the position of the first window of the 
  353. project. A value of -1 means no change or don't care.    
  354.  
  355. --------------------------------------------------------------------------
  356.  
  357. NEW
  358.    ,
  359.  
  360. NEW creates a new project.
  361.  
  362. --------------------------------------------------------------------------
  363.  
  364. OPEN
  365.    FILENAME/K
  366.  
  367. OPEN opens the specified text into a new project (if there is an
  368. unmodified new project around it will be opened into that).
  369.  
  370.  · FILENAME specifies the file to be opened.
  371.  
  372. --------------------------------------------------------------------------
  373.  
  374. PASTE
  375.    ,
  376.  
  377. PASTE puts the contents of the clipboard into the project - at the 
  378. cursor position.    
  379.  
  380. --------------------------------------------------------------------------
  381.  
  382. POSITION
  383.    SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
  384.  
  385. POSITION moves the cursor to the position specified by the argument:
  386.  · SOF moves it to the beginning of the file.
  387.  · EOF moves it to the end of the file.
  388.  · SOL moves it to the beginning of the current line.
  389.  · EOL moves it to the end of the current line.
  390.  · SOW moves it to the start of the current word.
  391.  · EOW moves it to the end of the current word.
  392.  · SOV moves it to the top of the current view.
  393.  · EOV moves it to the end of the current view.
  394.  
  395. --------------------------------------------------------------------------
  396.  
  397. PRINT
  398.    FILENAME/K
  399.  
  400. PRINT prints the contents of the current project. If FILENAME is 
  401. set, the text is print to the specified file instead of the printer.
  402.  
  403.  · FILENAME specifies a file where the text shall be printed to.
  404.  
  405. --------------------------------------------------------------------------
  406.  
  407. QUIT
  408.    FORCE/S
  409.  
  410. QUIT ends PolyEd. For every modified project a modified project 
  411. requester comes up.
  412.  
  413.  · FORCE suppresses the modified project requesters.
  414.  
  415. --------------------------------------------------------------------------
  416.  
  417. REDO 
  418.    ,
  419.  
  420. REDO allows you to undo the "UNDO" command.    
  421.  
  422. --------------------------------------------------------------------------
  423.  
  424. SAVE 
  425.    ,
  426.  
  427. SAVE saves the current project to its current filename. If the 
  428. project is unnamed, a file requester comes up, asking the user for a
  429. name for the project.    
  430.  
  431. --------------------------------------------------------------------------
  432.  
  433. SAVEAS
  434.    NAME/K 
  435.  
  436. This command saves the current project to the specified filename. If 
  437. no name is specified, a file requester comes up, asking the user for 
  438. a filename for the project.
  439.  
  440.  · NAME specifies the name to that the project should be saved. The 
  441.    name should be placed in quotes.
  442.  
  443. --------------------------------------------------------------------------
  444.  
  445. SETATTR
  446.    OBJECT/A,NAME,FIELD,NEWVALUE
  447.  
  448. SETATTR manipulates the aspects of an object.
  449.  
  450.  · OBJECT specifies the object type to manipulate.
  451.  · NAME specifies the handle of the object.
  452.  · FIELD specifies which field should be modified.
  453.  · NEWVALUE specifies the new value for that field. Watch out; some
  454.    fields require numeric values, some require strings.
  455.  
  456. In the above OBJECT you may set attributes of any of the following items:
  457.  
  458.  · APPLICATION
  459.  · PROJECT <name>
  460.  
  461. Valid values for FLAG_xxx fields are 0 and 1, where
  462. 0 means no/off/false and 1 means yes/on/true.
  463. All modifications are immediately made visible to the user.
  464.  
  465. If OBJECT is APPLICATION the following fields may be manipulated:
  466.  
  467.  · VAR_FINDSTRING    findstring for FIND, FINDCHANGE,
  468.              FINDNEXT and FINDPREVIOUS
  469.  · VAR_CHANGESTRING    changestring for FINDCHANGE
  470.  · FLAG_IGNORECASE    status of 'Ignore Case?'.
  471.  · FLAG_WHOLEWORDS    status of 'Whole Words?'.
  472.  · VAR_ARRANGEMODE    status of window arrange style
  473.             ( 0=stacked, 1=vertical, 2=horizontal, 3=full size )
  474.  · VAR_RIGHTBORDER    right border value
  475.  · VAR_TABWIDTH        Tab width value
  476.  · FLAG_OVERWRITE    status of 'Overwrite?'.
  477.  · FLAG_AUTOINDENT    status of 'Auto indent?'.
  478.  · FLAG_TABISSPACES    status of 'TAB is spaces?'.
  479.  · FLAG_WORDWRAP    status of 'Wordwrap?'
  480.  · FLAG_CREATEICONS    status of 'Create icons?'.
  481.  
  482.  
  483. If OBJECT is PROJECT the following fields may be manipulated:
  484.  
  485.  · FLAG_HIDDEN         0=Reveal project, 1=Hide project
  486.  
  487.  
  488. Examples:
  489. 'SETATTR APPLICATION FIELD VAR_TABWIDTH NEWVALUE 6' sets the Tab Width to 6.
  490. 'SETATTR APPLICATION FIELD FLAG_WORDWRAP NEWVALUE 1' activates Wordwrap.
  491. 'SETATTR APPLICATION FIELD VAR_FINDSTRING NEWVALUE foobar' lets further searches
  492.  look for foobar.
  493. 'SETATTR APPLICATION FIELD CURRENTPROJECT NEWVALUE foobar' makes the project
  494.  named foobar the current one.
  495. 'SETATTR PROJECT foobar FLAG_HIDDEN 1' hides project foobar.
  496. 'SETATTR PROJECT foobar FLAG_HIDDEN 0' reveals project foobar.
  497.  
  498. --------------------------------------------------------------------------
  499.  
  500. SIZEWINDOW
  501.    WIDTH/N,HEIGHT/N
  502.  
  503. SIZEWINDOW allows to change the size of the project's first window.
  504.  
  505. --------------------------------------------------------------------------
  506.  
  507. TEXT
  508.    NEWLINE/S,TEXT/F
  509.  
  510. TEXT inserts the specified text at the current cursor position of
  511. the project.
  512.  
  513.  · NEWLINE begins a new line _before_ the text is inserted.
  514.  · TEXT specifies the text to be inserted. If the text contains
  515.    spaces, or if there are spaces at the beginning or end of the
  516.    text, you should explicitly use the keyword, because otherwise
  517.    leading and trailing spaces are stripped off by the arugment
  518.    parser.
  519.  
  520. --------------------------------------------------------------------------
  521.  
  522. UNDO
  523.    ,
  524.  
  525. UNDO undoes actions of the user. UNDO can be undone by "REDO".
  526. See also menu item  'Edit/Undo'.
  527.  
  528. --------------------------------------------------------------------------
  529.  
  530. UNLOCKGUI
  531.    ,
  532.  
  533. UNLOCKGUI undoes "LOCKGUI" allowing GUI events to resume.
  534.  
  535. --------------------------------------------------------------------------
  536.  
  537. UNZOOMWINDOW
  538.    ,
  539.  
  540. UNZOOMWINDOW unshrinks the project's first window (see "ZOOMWINDOW").
  541.  
  542. --------------------------------------------------------------------------
  543.  
  544. WINDOWTOBACK
  545.    ,
  546.  
  547. WINDOWTOBACK moves the project's first window behind all other windows.
  548.  
  549. --------------------------------------------------------------------------
  550.  
  551. WINDOWTOFRONT
  552.    ,
  553.  
  554. WINDOWTOFRONT moves the project's first window in front of all other
  555. windows.
  556.  
  557. --------------------------------------------------------------------------
  558.  
  559. ZOOMWINDOW
  560.    ,
  561.  
  562. ZOOMWINDOW makes the project's first window very small. Use
  563. "UNZOOMWINDOW" to unshrink it again.
  564.